package com.elder.business.service.impl;

import java.util.List;
import com.elder.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.elder.business.mapper.FeeSchedulesMapper;
import com.elder.business.domain.FeeSchedules;
import com.elder.business.service.IFeeSchedulesService;

/**
 * 缴费信息Service业务层处理
 * 
 * @author elder
 * @date 2023-11-26
 */
@Service
public class FeeSchedulesServiceImpl implements IFeeSchedulesService 
{
    @Autowired
    private FeeSchedulesMapper feeSchedulesMapper;

    /**
     * 查询缴费信息
     * 
     * @param id 缴费信息主键
     * @return 缴费信息
     */
    @Override
    public FeeSchedules selectFeeSchedulesById(Long id)
    {
        return feeSchedulesMapper.selectFeeSchedulesById(id);
    }

    /**
     * 查询缴费信息列表
     * 
     * @param feeSchedules 缴费信息
     * @return 缴费信息
     */
    @Override
    public List<FeeSchedules> selectFeeSchedulesList(FeeSchedules feeSchedules)
    {
        return feeSchedulesMapper.selectFeeSchedulesList(feeSchedules);
    }

    /**
     * 新增缴费信息
     * 
     * @param feeSchedules 缴费信息
     * @return 结果
     */
    @Override
    public int insertFeeSchedules(FeeSchedules feeSchedules)
    {
        feeSchedules.setCreateTime(DateUtils.getLongTime());
        return feeSchedulesMapper.insertFeeSchedules(feeSchedules);
    }

    /**
     * 修改缴费信息
     * 
     * @param feeSchedules 缴费信息
     * @return 结果
     */
    @Override
    public int updateFeeSchedules(FeeSchedules feeSchedules)
    {
        feeSchedules.setUpdateTime(DateUtils.getLongTime());
        return feeSchedulesMapper.updateFeeSchedules(feeSchedules);
    }

    /**
     * 批量删除缴费信息
     * 
     * @param ids 需要删除的缴费信息主键
     * @return 结果
     */
    @Override
    public int deleteFeeSchedulesByIds(Long[] ids)
    {
        return feeSchedulesMapper.deleteFeeSchedulesByIds(ids);
    }

    /**
     * 删除缴费信息信息
     * 
     * @param id 缴费信息主键
     * @return 结果
     */
    @Override
    public int deleteFeeSchedulesById(Long id)
    {
        return feeSchedulesMapper.deleteFeeSchedulesById(id);
    }
}
